Anchor Tag

The anchor element tag is used to create hyperlinks between a source anchor and a destination anchor. The source is the text, image, or button that links to another resource and the destination is the resource that the source anchor links to.


The anchor element tag is the letter “a” surrounded by angle brackets like this: <a>.




Anchor attributes


href attribute

href is used to specify an url where the anchor should link to.


When we add the target attribute and _blank attribute to our link we tell the visitors browser to open the link in a new (blank) browser tab or window. If we render that code in the browser, when a visitor clicks the link it will open in a new tab.